package com.example.framework.bean;

import com.example.framework.proxy.HelleProxy;
import org.springframework.beans.factory.FactoryBean;

public class HelloFactoryBean implements FactoryBean {

    private Class serviceClz;

    public HelloFactoryBean(Class serviceClz) {
        this.serviceClz = serviceClz;
    }

    @Override
    public Object getObject() throws Exception {
        return new HelleProxy().getInstance(serviceClz);
    }

    @Override
    public Class<?> getObjectType() {
        return serviceClz;
    }
}
